{include file="public/layout" /}
<script type="text/javascript" src="__PUBLIC__/plugins/laydate/laydate.js"></script>
<body class="eyou_body_xin">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
{include file="shop_product/left" /}
<div id="geduan_div" class="h15"></div>
<div class="page" style="min-width:auto;margin-left:115px;padding-bottom: 15px;">
    <div class="fixed-bar">
        <div class="item-title">
            <ul class="tab-base nc-row">
                <li> <a href='{:url("ShopProduct/arctype_index")}' {if condition="'arctype_index' == $Think.const.ACTION_NAME"} class="current" {/if}>分类列表</a> </li>
                <li> <a href='{:url("ShopProduct/arctype_conf")}' {if condition="'arctype_conf' == $Think.const.ACTION_NAME"} class="current" {/if}>设置分类</a> </li>
            </ul>
        </div>
    </div>
    <!-- 操作说明 -->
    <div id="explanation" class="explanation" style="color: rgb(44, 188, 163); background-color: rgb(237, 251, 248); width: 99%; height: 100%;margin-bottom: 15px;">
        <div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
            <h4 title="提示相关设置操作时应注意的要点">提示</h4>
            <span title="收起提示" id="explanationZoom" style="display: block;"></span>
        </div>
        <ul>
            <li>在小程序端展示不同的分类页面的模板风格</li>
        </ul>
    </div>
    <form class="form-horizontal" id="post_form" action="{:url('ShopProduct/arctype_conf')}" method="post">
        <div class="ncap-form-default">
            <dl class="row">
                <dt class="tit"> <label>分类风格</label> </dt>
                <dd class="opt">
                    <label class="curpoin"><input name="shop[shop_arctype_level]" value="1" type="radio" {eq name="$usersConfig['shop_arctype_level']" value="1"} checked="checked" {/eq}>一级分类</label> &nbsp; 
                    <label class="curpoin"><input name="shop[shop_arctype_level]" value="2" type="radio" {eq name="$usersConfig['shop_arctype_level']" value="2"} checked="checked" {/eq}>二级分类</label> &nbsp;
                    <label class="curpoin"><input name="shop[shop_arctype_level]" value="3" type="radio" {eq name="$usersConfig['shop_arctype_level']" value="3"} checked="checked" {/eq}>三级分类</label> &nbsp;
                    <p class="notic"></p>
                </dd>
            </dl>
        </div>

        <div class="ncap-form-default">
            <div class="bot">
                <a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">保存</a>
            </div>
        </div> 
    </form>
</div>

<script type="text/javascript">
    function checkForm(){
        layer_loading('正在处理');
        $.ajax({
            type : 'post',
            url : "{:url('ShopProduct/arctype_conf', ['_ajax'=>1])}",
            data : $('#post_form').serialize(),
            dataType : 'json',
            success : function(res){
                layer.closeAll();
                if(res.code == 1){
                    layer.msg(res.msg, {shade: layer_shade, time: 1000}, function(){
                        window.location.reload();
                    });
                }else{
                    showErrorMsg(res.msg);
                }
            },
            error: function(e){
                layer.closeAll();
                showErrorAlert(e.responseText);
            }
        });
    }
</script>

{include file="public/footer" /}